$(function () {
	//mudidi
	if (document.getElementById("mddNav2")) {
		var sfEls = document.getElementById("mddNav2").getElementsByTagName("em");
		for (var i = 0; i < sfEls.length; i++) {
			sfEls[i].onmouseover = function () {
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			};
			sfEls[i].onmouseout = function () {
				this.className = this.className.replace(new RegExp("( ?|^)sfhover\\b"),
					"");
			};
		}
	}
	;
	if (document.getElementById("chanpin_nav")) {
		var sfEls = document.getElementById("chanpin_nav").getElementsByTagName("dt");
		for (var i = 0; i < sfEls.length; i++) {
			sfEls[i].onmouseover = function () {
				this.className += (this.className.length > 0 ? " " : "") + "sfhover";
			};
			sfEls[i].onmouseout = function () {
				this.className = this.className.replace(new RegExp("( ?|^)sfhover\\b"),
					"");
			};
		}
	}
	;



	//判断登录
	if ($.cookie('uid') > 0) {
		var username = $.cookie('username');
		var html =
			'<span>欢迎回来，<a target="_self" rel="nofollow" href="/user/info" id="username">' + username + '</a></span>|' +
			'<a href="/user/orderline"    target="_blank" rel="nofollow" >我的订单</a>|' +
			'<a href="/user/mycounsel"    target="_blank" rel="nofollow" >我的咨询</a>|' +
			'<a href="/user/loginout"  rel="nofollow" >退出</a>|';
		$("#topLogin").html(html);
	} else {
		var html = '|<a href="/user/login" rel="nofollow" >登录</a>|' +
			'<a href="/user/register" rel="nofollow" >注册</a>|';
		$("#topLogin").html(html);
	}
});




